package com.yibai.web.app.controller;


import com.yibai.web.app.service.WebsiteService;
import com.yibai.web.dto.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.jws.WebService;
import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fang
 * @since 2021-04-19
 */
@RestController
@Api(value = "文章管理",tags = {"文章管理"})
@RequestMapping("/app/website")
public class WebsiteController {

    @Autowired
    private WebsiteService websiteService;

    @PostMapping("/list")
    @ApiOperation(value = "网站列表" ,notes = "")
    public SuperResponse list(@Valid @RequestBody WebsiteListRequest request ){
        return websiteService.list(request);
    }

    @PostMapping("/update")
    @ApiOperation(value = "网站修改" ,notes = "")
    public SuperResponse update(@Valid @RequestBody WebsiteInfoRequest request ){
        return websiteService.update(request);
    }
}

